feat: implement get_density_from_cloud()#333
feat: implement get_density_from_cloud()#333yucongalicechen wants to merge 1 commit intodiffpy:mainfrom
get_density_from_cloud()#333Conversation
| for r in results: | ||
| if r.get("sg", "unknown").replace(" ", "").lower() == phase: | ||
| return r["structure"].density | ||
| print( |
There was a problem hiding this comment.
Print out available densities and phases. Since COD() handles invalid samples and phases I didn't write any error message here.
sbillinge
left a comment
There was a problem hiding this comment.
That's nicely done but it is failing tests. We may want to mock the API call in the test. We generally don't want the tests to rely on an internet connection.
I got a chance to play around with the functions a bit more. I also meant to say "space group" instead of "phase" earlier and in the code. I think the issues are:
|
|
honestly I am not sure I would rely on pymatgen/MP. Why not just make an API call to COD and get the cif and compute the density? |
closes #331
@sbillinge ready for review